<!doctype html>
<html class="no-js">
<head>
	<include file="./Apps/WebApp/View/default/common_meta.html"/>
	<title>商品列表 - {$CONF['mallTitle']}</title>
	<meta name="keywords" content="{$CONF['mallKeywords']}">
	<meta name="description" content="{$CONF['mallDesc']},商品列表">
	<link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/AmazeUI/assets/css/amazeui.min.css">
	<link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/common.css?v={$WST_V}">
	<link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/wst_page_common.css?v={$WST_V}">
	<link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/mui.min.css">
	<link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/iconfont.css">
	<link type="text/css" rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/hotel.css">
	<script src="__ROOT__/Apps/WebApp/View/default/js/jquery-1.8.2.min.js"></script>
	<script src="__ROOT__/Apps/WebApp/View/default/js/hotel.js"></script>
	<link rel="stylesheet" href="__ROOT__/Apps/WebApp/View/default/css/hotellist.css">
	<script type="text/javascript">
		var WST = ThinkPHP = window.Think = {
			"ROOT"   : "__ROOT__",
			"APP"    : "__APP__",
			"PUBLIC" : "__PUBLIC__",
			"DEEP"   : "{:C('URL_PATHINFO_DEPR')}",
			"MODEL"  : ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
			"VAR"    : ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"],
			"DOMAIN" : "{:WSTDomain()}",
			"CITY_ID" : "{$currArea['areaId']}",
			"CITY_NAME" : "{$currArea['areaName']}",
			"DEFAULT_IMG": "{:WSTDomain()}/{$CONF['goodsImg']}",
			"MALL_NAME" : "{$CONF['mallName']}",
			"SMS_VERFY"  : "{$CONF['smsVerfy']}",
			"PHONE_VERFY"  : "{$CONF['phoneVerfy']}",
			"IS_LOGIN" :"{$WST_IS_LOGIN}",
			"WST_STYLE" :"{$WST_STYLE}"
		}
		WST.toJson = function(str){
					var json = {};
					try{
						if(typeof(str)=="object"){
							json = str;
						}else{
							json = eval("("+str+")");
						}
						if(json.status && json.status=='-999'){
//			wstMsg('对不起，您尚未登录系统，请先登录');
							setTimeout(function(){
								location.href = WST.U('WebApp/Users/index');
							}, 2000);
						}
					}catch(e){
//		wstMsg("系统发生错误:"+e.getMessage);
						json = {};
					}
					return json;
				}
	</script>
	<script>
		function gethotellist(currpage,flag){
			var param = {};
			//获取当前页面加载数据的次数
			param.currPage = currpage + 1;
			//获取价格区间
			param.money = Number( $('#money').val());
			//获取出租类型
			param.rentalType = Number( $('#rentalType').val());
			//获取房屋户型
			param.houseType = Number( $('#houseType').val());
			//获取设施服务
			param.facilities = Number( $('#facilities').val());
			//获取宜住人数
			param.liveable = Number( $('#liveable').val());
			//获取关键词
			param.key = Number( $('#key').val());
			//获取排序方式
			param.orderBy = Number( $('#orderBy').val());
//alert(JSON.stringify(param));
			$.ajax({
				url : WST.U('WebApp/Hotel/getHotelByPage'),
				type : 'POST',
				data : param,
				dataType : "JSON",
				success : function (json) {
//					alert(JSON.stringify(json));
					var content = '';
					if(json && json.root && json.root.length>0){
						for(var i=0; i<json.root.length; i++){
							content +='<li class="list_wrapper lodge_item" id="lodge-item-6779853415">'+
									'<a hreft=""><img id="img-6779853415" class="list_pic lazy_load_img" style="min-height:190px;max-height:300px" xzsrc="ok" replacesrc="images/lazy_image.png" src="'+ WST.ROOT +'/'+json.root[i].goodsImg+'"></a>'+
									'<div class="pic_btm">'+
									'<span class="list_price">¥<span style="font-size: 30px">'+json.root[i].shopPrice+'</span>起/晚</span><span class="list_img"><img class="lazy_load_img" id="img-head-6779853415" xzsrc="ok" replacesrc="images/lazy_header.png" src="'+ WST.ROOT +'/'+json.root[i].shopImg+'"></span>'+
									'<div class="list_intro"><span class="list_title">【5月特惠】'+json.root[i].h_title+'</span>'+
									'<div class="review"><span style="font-size: 12px">'+json.root[i].rentalType+'/'+json.root[i].bed+'床铺/宜住'+json.root[i].liveable+'人</span><span style="font-size: 12px"> - 5分/13点评 </span></div>'+
									'<div class="x_det_infor">'+
									'<span class="daysdiscount"><i class="x_icon_cz"></i>长租优惠</span><span class="cashPledgeFree"><i class="x_icon_my"></i>免押金</span><span class="shipaiyanzhen"><i class="x_icon_sp"></i>实拍</span><span class="shipaiyanzhen"><i class="x_icon_yz"></i>验真</span><span class="isdoorlock"><i class="x_icon_ms"></i>智能门锁</span>'+
									'</div>'+
									'</div>'+
									'</div>'+
									'</li>';
						}
						$('#currPage').val(json.currPage);
						$('#totalPage').val(json.totalPage);
//						console.log(content);
					}
					if(flag==1){
						$('.hotels').empty();
						$('html,body').animate({scrollTop:0},1000);//回到顶端
					}
					$('.hotels').append(content);;
				}
			});
		}
	</script>
</head>
<body>
<include file="./Apps/WebApp/View/default/common_header.html"/>
<!-- screening -->
<div class="screening">
	<ul>
		<li class="Regional"><span>所在城市</span></li>
		<li class="Sort"><span>位置区域</span></li>
		<li class="Brand"><span>更多筛选</span></li>
		<li class="meishi"><span>推荐排序</span></li>
	</ul>
</div>
<!-- End screening -->

<!--所在城市-->
<div class="grade-eject">
	<ul class="grade-w" id="gradew">
		<li onclick="grade1(this)">哈尔滨</li>
		<li onclick="grade1(this)">全国</li>
		<li onclick="grade1(this)">北京</li>
		<li onclick="grade1(this)">天津</li>
		<li onclick="grade1(this)">河北</li>
		<li onclick="grade1(this)">山西</li>
		<li onclick="grade1(this)">内蒙古</li>
		<li onclick="grade1(this)">辽宁</li>
		<li onclick="grade1(this)">吉林</li>
		<li onclick="grade1(this)">黑龙江</li>
		<li onclick="grade1(this)">上海</li>
		<li onclick="grade1(this)">江苏</li>
		<li onclick="grade1(this)">山东</li>
		<li onclick="grade1(this)">河南</li>
		<li onclick="grade1(this)">湖北</li>
		<li onclick="grade1(this)">湖南</li>
		<li onclick="grade1(this)">广东</li>
		<li onclick="grade1(this)">广西</li>
		<li onclick="grade1(this)">海南</li>
	</ul>
	<ul class="grade-t" id="gradet">
		<div class="zimu">A</div>
		<li onclick="gradet(this)">全河北</li>
		<div class="zimu">B</div>
		<li onclick="gradet(this)">石家庄</li>
		<li onclick="gradet(this)">唐山</li>
		<li onclick="gradet(this)">秦皇岛</li>
		<div class="zimu">C</div>
		<li onclick="gradet(this)">邢台</li>
		<li onclick="gradet(this)">保定</li>
		<li onclick="gradet(this)">张家口</li>
		<div class="zimu">D</div>
		<li onclick="gradet(this)">承德</li>
		<li onclick="gradet(this)">沧州</li>
		<div class="zimu">E</div>
		<li onclick="gradet(this)">廊坊</li>
		<li onclick="gradet(this)">衡水</li>
	</ul>
</div>
<!-- End 所在城市 -->

<!-- 位置区域-->
<div class="Sort-eject Sort-height">
	<ul class="Sort-Sort" id="Sort-Sort">
		<li class="list_li">行政区</li>
		<li class="list_li">地铁线路</li>
		<li class="list_li">车站机场</li>
		<li class="list_li">商圈</li>
		<li class="list_li">景点</li>
		<li class="list_li">高校</li>
		<li class="list_li">医院</li>
	</ul>
</div>

<!--更多筛选-->
<div class="Category-eject">
	<ul class="Category-w" id="Categorytw">
		<li style="height: 150px">
			<p style="height: 30px">价格</p>
<div style="height: 100px;background-color: red">
	<input type="text" id="range" class="money inp">
</div>
</li>
		<li style="height: 70px">
			<p style="height: 30px">出租类型</p>
			<table style="width: 100%;font-size: 16px">
				<tr>
					<td width="33%"><input type="checkbox" class="rental" value="" >整套出租</td>
					<td width="33%"><input type="checkbox" class="rental" value="" >独立单间</td>
					<td width="33%"><input type="checkbox" class="rental" value="" >合住房间</td>
				</tr>
			</table>
		</li>
		<li style="height: 110px">
			<p style="height: 30px">房屋户型</p>
			<table style="width: 100%;font-size: 16px">
				<tr>
					<td width="33%"><input type="checkbox" class="house" value="">一居</td>
					<td width="33%"><input type="checkbox" class="house" value="">二居</td>
					<td width="33%"><input type="checkbox" class="house" value="">三居</td>
				</tr>
				<tr>
					<td width="33%"><input type="checkbox" class="house" value="">四居</td>
					<td width="33%"><input type="checkbox" class="house" value="">其他</td>
				</tr>
			</table>
		</li>
		<li style="height: 100px">
			<p style="height: 30px">设施服务</p>
		</li>
		<li style="height:90px">
			<p style="height: 30px">宜住人数</p>
		</li>
		<li style="height: 70px;">
			<p style="height: 30px">关键词</p>
			<input type="text" width="90%" style="margin-left:-1%;">
		</li>
		<li style="height: 30px">
			<button style="width:49%;float: left;margin-left:-2% " onclick="">清楚筛选</button>
			<button style="width:49%;float:right" onclick="">确定</button>
		</li>
	</ul>
	<input type="hidden" id="money" value="">
	<input type="hidden" id="rentalType" value="">
	<input type="hidden" id="houseType" value="">
	<input type="hidden" id="facilities" value="">
	<input type="hidden" id="liveable" value="">
	<input type="hidden" id="key" value="">
</div>
<!-- End 更多筛选 -->

<!-- 推荐排序 -->
<div class="meishi22">
	<ul class="meishia-w" id="meishia">
		<li onclick="orderBy(0)">推荐排序</li>
		<li onclick="orderBy(1)">好评排序</li>
		<li onclick="orderBy(2)">价格 高-低</li>
		<li onclick="orderBy(3)">价格 低-高</li>
	</ul>
	<input type="hidden" id="orderBy" value="0">
</div>
<!--内容-->
<ul class="hotels">

</ul>

<input type="hidden" name="" value="0" id="currPage" autocomplete="off">
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
<script>
	//排序
	function orderBy(num){
		var str=$('#meishia li').eq(num).text();
		$('.meishi span').text(str).click();
		$('#orderBy').val(num);
		gethotellist(0,1);
	}
</script>
<script>
	var currPage = totalPage = 0;
	var loading = false;
	$(document).ready(function(){
		gethotellist(0);

		$(window).scroll(function(){
			if (loading) return;
			if ((0 + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
				currPage = Number( $('#currPage').val() );
				totalPage = Number( $('#totalPage').val() );
				if( totalPage > 0 && currPage < totalPage ){
					gethotellist(currPage);
//
				}
			}
		});
	});
</script>
<include file="./Apps/WebApp/View/default/common_js.html"/>
<script src="__ROOT__/Apps/WebApp/View/default/AmazeUI/assets/js/handlebars.min.js"></script>
<script src="__ROOT__/Apps/WebApp/View/default/AmazeUI/assets/js/amazeui.widgets.helper.min.js"></script>
<script src="__ROOT__/Apps/WebApp/View/default/js/wst_page_common.js?v={$WST_V}"></script>
</body>
</html>